<!doctype html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<title>Office Reader</title>
	<link rel="icon" href="<?php $this->url('static/images/icon.png');?>">
	<!-- <script>var kodSdkConfig = {api:'<?php echo APP_HOST;?>'};</script> -->
	<?php if(clear_quote($fileApp) != 'pptxjs') $this->link('app/dist/sdk.js','static');?>
	<?php $this->link('style/lib/font-icon/style.css','static');?>
	<?php $this->link('static/office/msg.css');?>
	<script>
		var BASE_URL = "<?php echo $this->pluginHost.'static/';?>";
		var BASE_URL_API = "<?php echo $this->pluginApi;?>";
		var FILE_INFO = {
			fileUrl:	'<?php echo clear_quote($fileUrl);?>',	// 获取url
			fileName: 	'<?php echo clear_quote($fileName);?>', // 文件名
			savePath:	'<?php echo clear_quote($savePath);?>', // 文件路径;有则可以直接保存;没有且canWrite则可以另存为;
			canWrite:	'<?php echo clear_quote($canWrite);?>',	// 是否可写; 可写才能编辑;
			fileApp:	'<?php echo clear_quote($fileApp);?>',	// 文件打开方式
			fileExt:	'<?php echo clear_quote($fileExt);?>',	// 文件后缀
		};
		// var appLang = '<?php echo I18n::getType();?>';
	</script>
</head>

<style>
	body:after{
		position:absolute;top:0;right:0;bottom:0;left:0;z-index: 100;
		background:url("<?php echo STATIC_PATH.'images/common/loading-page.gif';?>");
		margin:auto;width:72px;height:72px;background-color:#eee;
		content:"";text-align: center;transition: all 0.5s;
		background-size:100% 100%;background-repeat: no-repeat;
		border-radius:8px;box-shadow: 0 5px 20px rgba(0,0,0,0.05);
	}
	body.page-loaded:after{visibility:hidden;opacity:0;}

	body {background: #f6f6f6;}
	body .page-box{background: #fff;}
	.hidden {display: none;}
</style>

<body class="loading">
<div class="loading-content"></div>	

	<div class="page-box">
		<div id="output"></div>
	</div>
    <div id="msgbox" class="hidden">
		<div id="title">出错了! (warning!)</div>
		<div id="message"></div>
		<!-- <div id="info"></div> -->
	</div>

	<?php $this->link('static/office/page.js');?>
	<?php switch(clear_quote($fileApp)) {
		case 'mammothjs':
			$this->link('static/office/mammothjs/mammoth.browser.min.js');
			$this->link('static/office/mammothjs/index.js');
			break;
		case 'luckysheet':
			$this->link('static/office/luckysheet/plugins/css/pluginsCss.css');
			$this->link('static/office/luckysheet/plugins/plugins.css');
			$this->link('static/office/luckysheet/css/luckysheet.css');
			$this->link('static/office/luckysheet/assets/iconfont/iconfont.min.css');
			$this->link('static/office/luckysheet/index.css');
			$this->link('static/office/luckysheet/plugins/js/plugin.js');
			$this->link('static/office/luckysheet/luckysheet.umd.js');
			$this->link('static/office/luckysheet/luckyexcel.umd.min.js');
			$this->link('static/office/sheetjs/xlsx.core.min.js');
			$this->link('static/office/luckysheet/utils.js');
			$this->link('static/office/luckysheet/index.js');
			break;
		case 'pptxjs':
			$this->link('static/office/pptxjs/css/pptxjs.css');
			$this->link('static/office/pptxjs/css/nv.d3.min.css');
			$this->link('static/office/pptxjs/index.css');
			$this->link('static/office/pptxjs/js/jquery-1.11.3.min.js');
			$this->link('static/office/pptxjs/js/jszip.min.js');
			$this->link('static/office/pptxjs/js/filereader.js');
			$this->link('static/office/pptxjs/js/d3.min.js');
			$this->link('static/office/pptxjs/js/nv.d3.min.js');
			$this->link('static/office/pptxjs/js/pptxjs.min.js');
			$this->link('static/office/pptxjs/js/divs2slides.min.js');
			$this->link('static/office/pptxjs/js/jquery.fullscreen-min.js');
			$this->link('static/office/pptxjs/index.js');
			break;
		default:break;
	}?>
</body>
</html>

